#include <iostream>

using namespace std;

int fact(int val) {
    int ret = 1;
    while (val > 1) ret *= val--;
    return ret;
}

int main() {
    int n;
    while (cin >> n) {
        cout << fact(n) << endl;
    }
    return 0;
}